<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0">
	<link rel="stylesheet" href="../res/css/weui.css" />
    <link rel="stylesheet" href="../res/css/weuix.css" />
	<link rel="stylesheet" href="../res/css/common.css" />
    <title></title>
	<script src="../res/js/zepto.min.js"></script>
	<script src="../res/js/zepto.weui.js"></script>
    <!-- <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script> -->
    <script src="../res/js/vue.min.js"></script>
	<script src="../res/js/common.js?v=1"></script>

    <style>
        body{
            height: 100%;
        }
        #app{
            display: flex;
            flex-direction: column;
            align-items: stretch;
            min-height: 100%;
        }
        .top-bar{
            position: sticky;
            position: -webkit-sticky;
            top: 0;
            z-index: 9;
            box-shadow: 0 0 8px -4px #e0e0e0;
        }
        
        .agreement-body{
            margin: 15px;
            border-radius: 8px;
            padding: 10px;
            background-color: #fff;
        }
    </style>
</head>
<body>
    <main id="app">
        <div class="weui-btn_primary weui-header top-bar">
            <div class="weui-header-left"><a class="icon icon-109" @click="pageBack"></a></div>
            <h1 class="weui-header-title">{{agreementTitle}}</h1>
        </div>

        <div class="agreement-body" v-html="agreement">

        </div>
    </main>
</body>
<script>
new Vue({
    el: '#app',
    data: {
        agreementTitle: '',
        agreement: ''
    },
    methods: {
        pageBack(){
            history.back()
        },
        getAgreement(){
            const that = this
			newAjaxPost('/h5/utilInitData/getAgreement', {id: 2}, function (res) {
				that.agreementTitle = res.data.initName
                that.agreement = res.data.initKey
			})
		}
    },
    mounted(){
        this.getAgreement()
    }
})
</script>

</html>